CC=gcc
RM=rm
RMFLAGS=-f
CP=cp
CFLAGS=-c -Wall
LDFLAGS=
SOURCES=main.c language.c display.c input.c game.c log.c
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=tictactoe

all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.c.o:
	$(CC) $(CFLAGS) $< -o $@

clean:
	$(RM) $(RMFLAGS) $(OBJECTS)
	
reallyclean: clean
	$(RM) $(RMFLAGS) $(EXECUTABLE)
	
install:
	$(CP) $(EXECUTABLE) /usr/local/bin/$(EXECUTABLE)
	
uninstall:
	$(RM) $(EXECUTABLE) /usr/local/bin/$(EXECUTABLE)
